package cn.echase.ecare.yinfayun.domain.entity;

import cn.echase.ecare.yinfayun.domain.entity.base.YinFaYunTenantEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.util.Date;


/**
 * <p>
 * 机构交易记录
 * </p>
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("org_transaction_record")
public class OrgTransactionRecord extends YinFaYunTenantEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * uuid
     */
    private String uuId;

    /**
     * 长者id
     */
    private String payerId;

    /**
     * 长者姓名
     */
    private String payerName;

    /**
     * 子账户类型(1-预缴金账户)
     */
    private Integer subType;

    /**
     * 科目类别(1-预收款 2-收入 3-支出)
     */
    private Integer accountCategory;

    /**
     * 收/支方式 : 1-收入 2-支出
     */
    private Integer transactionType;

    /**
     * 变更前余额
     */
    private Integer beforeBalance;

    /**
     * 变更金额
     */
    private Integer changeMoney;

    /**
     * 变更后余额
     */
    private Integer afterBalance;

    /**
     * 交易时间
     */
    private Date transactionTime;

    /**
     * 收款方式
     */
    private String payType;

    /**
     * 备注
     */
    private String remark;

    /**
     * 账单id
     */
    private String billId;

    /**
     * 关联业务类型（1 结算单 2 预缴单 3 日账）
     */
    private String businessType;

    /**
     * 关联业务编码（账单编码/预缴单编码/日账单编码）
     */
    private String businessNo;

    /**
     * 支付编码（PN）
     */
    private String payNo;

    /**
     * 删除标志（0-未删除 2-已删除）
     */
    private String delFlag;

    /**
     * appId
     */
    private String appId;

    public OrgTransactionRecord(String uuId, String tenantId, String payerId, String payerName, Integer subType, Integer accountCategory
            , Integer transactionType, Integer beforeBalance, Integer changeMoney, Integer afterBalance, Date transactionTime, String payType, String billId, String remark) {
        this.uuId = uuId;
        this.setTenantId(tenantId);
        this.payerId = payerId;
        this.payerName = payerName;
        this.subType = subType;
        this.accountCategory = accountCategory;
        this.transactionType = transactionType;
        this.beforeBalance = beforeBalance;
        this.changeMoney = changeMoney;
        this.afterBalance = afterBalance;
        this.transactionTime = transactionTime;
        this.payType = payType;
        this.billId = billId;
        this.remark = remark;
    }
}
